import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);
//刷新页面会丢失用户信息
let userInfo=localStorage.getItem("stu-info")||"{}"
userInfo=JSON.parse(userInfo)
export default new Vuex.Store({
  state: {
    userInfo:userInfo
  },
  mutations: {
    SET_userInfo(state,payload){
      state.userInfo=payload
    }
  },
  actions: {},
  modules: {}
});
